package com.onpositive.realmview.model;

import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;

/**
 * Superinterface for some objects, which can persists it's state to data stream
 * @author 32kda
 *
 */
public interface IStreamPersistable
{

	/**
	 * Read object's state from stream
	 * @param stream {@link DataInputStream} to read 
	 * @throws IOException
	 */
	public abstract void read(DataInputStream stream) throws IOException;

	/**
	 * Write object's state to stream
	 * @param stream {@link DataOutputStream}to write to
	 * @throws IOException
	 */
	public abstract void store(DataOutputStream stream) throws IOException;

}
